home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-05 | 6.4 KB | 332 lines | [TEXT/MPS ] |
- ;
- ; File: Speech.a
- ;
- ; Contains: xxx put contents here xxx
- ;
- ; Written by: xxx put writers here xxx
- ;
- ; Copyright: © 1993-1994 by Apple Computer, Inc., all rights reserved.
- ;
-
-
-
-
- IF &TYPE('__INCLUDINGSPEECHEQU__') = 'UNDEFINED' THEN
- __INCLUDINGSPEECHEQU__ SET 1
-
-
- INCLUDE 'FSEqu.a' ; for FSSpec
- INCLUDE 'Traps.a' ; for SoundDispatch
-
-
-
- gestaltSpeechAttr EQU 'ttsc' ; Gestalt Manager selector for Speech Attributes
- gestaltSpeechMgrPresent EQU 0 ; Gestalt bit which indicates that Speech Manager exists
-
-
- kTextToSpeechSynthType EQU 'ttsc' ; Text-to-Speech Synthesizer component type
- kTextToSpeechVoiceType EQU 'ttvd' ; Text-to-Speech Voice resource type
- kTextToSpeechVoiceFileType EQU 'ttvf' ; Text-to-Speech Voice file type
- kTextToSpeechVoiceBundleType EQU 'ttvb' ; Text-to-Speech Voice Bundle file type
-
- ; Speech Manager error codes (Range from 240 - 259)
- noSynthFound EQU -240
- synthOpenFailed EQU -241
- synthNotReady EQU -242
- bufTooSmall EQU -243
- voiceNotFound EQU -244
- incompatibleVoice EQU -245
- badDictFormat EQU -246
-
-
- ; constants for SpeakBuffer and TextDone callback controlFlags bits
- kNoEndingProsody EQU 1
- kNoSpeechInterrupt EQU 2
- kPreflightThenPause EQU 4
-
-
- ; constants for StopSpeechAt and PauseSpeechAt
- kImmediate EQU 0
- kEndOfWord EQU 1
- kEndOfSentence EQU 2
-
-
- soStatus EQU 'stat' ; GetSpeechInfo & SetSpeechInfo selectors
- soErrors EQU 'erro'
- soInputMode EQU 'inpt'
- soCharacterMode EQU 'char'
- soNumberMode EQU 'nmbr'
- soRate EQU 'rate'
- soPitchBase EQU 'pbas'
- soPitchMod EQU 'pmod'
- soVolume EQU 'volm'
- soSynthType EQU 'vers'
- soRecentSync EQU 'sync'
- soPhonemeSymbols EQU 'phsy'
- soCurrentVoice EQU 'cvox'
- soCommandDelimiter EQU 'dlim'
- soReset EQU 'rset'
- soCurrentA5 EQU 'myA5'
- soRefCon EQU 'refc'
- soTextDoneCallBack EQU 'tdcb'
- soSpeechDoneCallBack EQU 'sdcb'
- soSyncCallBack EQU 'sycb'
- soErrorCallBack EQU 'ercb'
- soPhonemeCallBack EQU 'phcb'
- soWordCallBack EQU 'wdcb'
- soSynthExtension EQU 'xtnd'
-
-
-
- * Speaking Mode Constants
-
- modeText EQU 'TEXT' ; input mode constants
- modeTX EQU 'TX'
- modePhonemes EQU 'PHON'
- modePH EQU 'PH'
- modeNormal EQU 'NORM' ; character mode and number mode constants
- modeLiteral EQU 'LTRL'
-
- ; GetVoiceInfo selectors
- soVoiceDescription EQU 'info' ; gets basic voice info
- soVoiceFile EQU 'fref' ; gets voice file ref info
-
-
- SpeechChannelRecord RECORD 0
- data DS.L 1
- ENDR
-
-
- VoiceSpec RECORD 0
- creator DS.L 1 ; creator id of required synthesizer
- id DS.L 1 ; voice id on the specified synth
- ENDR
-
-
- kNeuter EQU 0
- kMale EQU 1
- kFemale EQU 2 ; returned in gender field below
-
-
- VoiceDescription RECORD 0
- length DS.L 1 ; size of structure - set by application
- voice DS VoiceSpec ; voice creator and id info
- version DS.L 1 ; version code for voice
- name DS.B 64 ; name of voice
- comment DS.B 256 ; additional text info about voice
- gender DS.W 1 ; neuter, male, or female
- age DS.W 1 ; approximate age in years
- script DS.W 1 ; script code of text voice can process
- language DS.W 1 ; language code of voice output speech
- region DS.W 1 ; region code of voice output speech
- reserved DS.L 4 ; always zero - reserved for future use
- ENDR
-
-
-
- VoiceFileInfo RECORD 0
- fileSpec DS FSSpec ; volume, dir, & name information for voice file
- resID DS.W 1 ; resource id of voice in the file
- ENDR
-
- SpeechStatusInfo RECORD 0
- outputBusy DS.B 1 ; TRUE if audio is playing
- outputPaused DS.B 1 ; TRUE if channel is paused
- inputBytesLeft DS.L 1 ; bytes left to process
- phonemeCode DS.W 1 ; opcode for cur phoneme
- ENDR
-
- SpeechErrorInfo RECORD 0
- count DS.W 1 ; # of errs since last check
- oldest DS.W 1 ; oldest unread error
- oldPos DS.L 1 ; char position of oldest err
- newest DS.W 1 ; most recent error
- newPos DS.L 1 ; char position of newest err
- ENDR
-
- SpeechVersionInfo RECORD 0
- synthType DS.B 4 ; always ‘ttsc’
- synthSubType DS.B 4 ; synth flavor
- synthManufacturer DS.B 4 ; synth creator ID
- synthFlags DS.L 1 ; synth feature flags
- synthVersion DS.B 7 ; !!!! NEED TO DEFINE 'NumVersion' !!!! synth version number
- ENDR
-
- PhonemeInfo RECORD 0
- opcode DS.W 1 ; opcode for the phoneme
- phStr DS.B 16 ; corresponding char string
- exampleStr DS.B 32 ; word that shows use of phoneme
- hiliteStart DS.W 1 ; segment of example word that
- hiliteEnd DS.W 1 ; should be hilighted (ala TextEdit)
- ENDR
-
- PhonemeDescriptor RECORD 0
- phonemeCount DS.W 1 ; # of elements
- thePhonemes DS PhonemeInfo; ; element list
- ENDR
-
- SpeechXtndData RECORD 0
- synthCreator DS.B 4 ; synth creator id
- synthData DS.B 2 ; data TBD by synth
- ENDR
-
- DelimiterInfo RECORD 0
- startDelimiter DS.B 2 ; defaults to “[[“
- endDelimiter DS.B 2 ; defaults to “]]“
- ENDR
-
- MACRO
- _SpeechManagerVersion
- MOVE.L #$0000000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _MakeVoiceSpec
- MOVE.L #$0604000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _CountVoices
- MOVE.L #$0108000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _GetIndVoice
- MOVE.L #$030C000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _GetVoiceDescription
- MOVE.L #$0610000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _GetVoiceInfo
- MOVE.L #$0614000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _NewSpeechChannel
- MOVE.L #$0418000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _DisposeSpeechChannel
- MOVE.L #$021C000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _SpeakString
- MOVE.L #$0220000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _SpeakText
- MOVE.L #$0624000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _SpeakBuffer
- MOVE.L #$0828000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _StopSpeech
- MOVE.L #$022C000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _StopSpeechAt
- MOVE.L #$0430000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _PauseSpeechAt
- MOVE.L #$0434000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _ContinueSpeech
- MOVE.L #$0238000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _SpeechBusy
- MOVE.L #$003C000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _SpeechBusySystemWide
- MOVE.L #$0040000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _SetSpeechRate
- MOVE.L #$0444000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _GetSpeechRate
- MOVE.L #$0448000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _SetSpeechPitch
- MOVE.L #$044C000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _GetSpeechPitch
- MOVE.L #$0450000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _SetSpeechInfo
- MOVE.L #$0654000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _GetSpeechInfo
- MOVE.L #$0658000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _TextToPhonemes
- MOVE.L #$0A5C000C,D0
- _SoundDispatch
- ENDM
-
- MACRO
- _UseDictionary
- MOVE.L #$0460000C,D0
- _SoundDispatch
- ENDM
-
-
- ENDIF ; already included...
-
-
-